import config from "@/config"
import http from "@/utils/request"
export const showPageApi = {
    url: `${config.BASE_URL}/reservesoldiers/ConditionalCandidate/select`,
    name: "展示页面数据",
    get: async function(data){
        return await http.get(`${this.url}?pageNum=${data.pageNum}&pageSize=${data.pageSize}`);
    }
}

export const singleSearchApi= {
    url: `${config.BASE_URL}/reservesoldiers/ConditionalCandidate/selectByFile`,
    name: "单字段查询",
    get: async function(content,field){
        return await http.get(`${this.url}?content=${content}&field=${field}`);
    }
}

export const allSearchApi= {
    url: `${config.BASE_URL}/reservesoldiers/ConditionalCandidate/selectConditions`,
    name: "高级查询",
    post: async function(data){
        return await http.post(`${this.url}?name=${name}`,data);
    }
}

export const select_person_api= {
    url: `${config.BASE_URL}/reservesoldiers/ConditionalCandidate/update`,
    name: "选人",
    put: async function(person,id){
        return await http.put(`${this.url}?candidates_number=${person}&conditional_candidate_id=${id}`);
    }
}
